<?php 
/* SVN FILE: $Id$ */
/* ArticlesTag Test cases generated on: 2008-08-20 08:08:55 : 1219187095*/
App::import('Model', 'ArticlesTag');

class TestArticlesTag extends ArticlesTag {
	var $cacheSources = false;
	var $useDbConfig  = 'test_suite';
}

class ArticlesTagTestCase extends CakeTestCase {
	var $ArticlesTag = null;
	var $fixtures = array('app.articles_tag', 'app.article', 'app.tag');

	function start() {
		parent::start();
		$this->ArticlesTag = new TestArticlesTag();
	}

	function testArticlesTagInstance() {
		$this->assertTrue(is_a($this->ArticlesTag, 'ArticlesTag'));
	}

	function testArticlesTagFind() {
		$this->ArticlesTag->recursive = -1;
		$results = $this->ArticlesTag->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('ArticlesTag' => array(
			'id'  => 1,
			'article_id'  => 1,
			'tag_id'  => 1
			));
		$this->assertEqual($results, $expected);
	}
}
?>